<template>
  <div>
    <el-radio-group v-model="labelPosition" size="small">
      <el-radio-button label="left">左对齐</el-radio-button>
      <el-radio-button label="right">右对齐</el-radio-button>
      <el-radio-button label="top">顶部对齐</el-radio-button>
    </el-radio-group>
    <div style="margin: 20px;"></div>
    <el-form :label-position="labelPosition" label-width="80px" :model="formLabelAlign">
      <el-form-item label="名称">
        <el-input v-model="formLabelAlign.name"></el-input>
      </el-form-item>
      <el-form-item label="活动区域">
        <el-input v-model="formLabelAlign.region"></el-input>
      </el-form-item>
      <el-form-item label="活动形式">
        <el-input v-model="formLabelAlign.type"></el-input>
      </el-form-item>
    </el-form>
    <el-button type="primary" @click="onSubmit()">主要按钮</el-button>
  </div>
</template>

<script>
  export default {
    name: "login",
    data() {
      return {
        labelPosition: 'right',
        formLabelAlign: {
          name: '',
          region: '',
          type: ''
        }
      };
    },
     methods: {
      onSubmit() {
        let that = this;

         console.log(that.formLabelAlign.name,
                     that.formLabelAlign.region,
                     that.formLabelAlign.type);
        that.axios.get(that.proxy+'/login?name='+that.formLabelAlign.name)
          .then(function (response) {
            if(response.status===200){
              console.log(response.data)

            }
          })


      }
    }
  }
</script>

<style scoped>

</style>
